using CSC440TeamOne.CSC440BusinessService.Interface.Services;
using CSC440TeamOne.CSC440BusinessService.Services;
using Microsoft.Practices.CompositeWeb;
using Microsoft.Practices.CompositeWeb.Interfaces;

namespace CSC440TeamOne.CSC440BusinessService
{
    public class CSC440BusinessServiceModuleInitializer : ModuleInitializer
    {
        public override void Load(CompositionContainer container)
        {
            base.Load(container);

            AddGlobalServices(container.Services);
        }

        protected virtual void AddGlobalServices(IServiceCollection globalServices)
        {
            // TODO: add a service that will be visible to any module

            globalServices.AddNew<DummyDataService, IDataService>();
            
            globalServices.AddNew<DummyUserService, ISecurityService>();

            globalServices.AddNew<DummyService, IBusinessService>();
        }

        public override void Configure(IServiceCollection services, System.Configuration.Configuration moduleConfiguration)
        {
        }
    }
}
